import React from 'react';
import { Child } from './Child';

export class Parent extends React.Component {
  state = {
    lastName: '王',
  };

  render() {
    return (
      <div>
        <div>我是父组件，我姓：{this.state.lastName}</div>
        <div>我继承了：{this.props.money}块</div>
        <Child lastName={this.state.lastName} money={this.props.money} />
      </div>
    );
  }
}
